import django_filters
from django.db.models import Q
from apps.projectbases.models import  ProjectPlanHModel, DepartmentsModel


class ProjectPlanHFilters(django_filters.rest_framework.FilterSet):
    serial_number = django_filters.CharFilter(field_name='serial_number', lookup_expr='exact')
    department = django_filters.CharFilter(field_name='department', lookup_expr='exact')
    project_name = django_filters.CharFilter(field_name='project_name', lookup_expr='contains')
    start_date = django_filters.DateFilter(field_name='start_date', lookup_expr='gte')
    end_date = django_filters.DateFilter(field_name='end_date', lookup_expr='lte')
    project_status = django_filters.CharFilter(field_name='project_status', lookup_expr='exact')

    class Meta:
        model = ProjectPlanHModel
        fields = '__all__'

